package collection;

import java.util.HashMap;
import java.util.Map;

public class HashMapTest {
    public static void main(String[] args) {
//        int n = 17 - 1;
//        n |= n >>> 1;
//        n |= n >>> 2;
//        n |= n >>> 4;
//        n |= n >>> 8;
//        n |= n >>> 16;
//        long i = (n < 0) ? 1 : (n >= 1<<30) ? 1<<30 : n + 1;
//        System.out.println(i);


        HashMap<String,String> hashMap = new HashMap<>();
        hashMap.put("1","1");

        for (String key :hashMap.keySet()){
            hashMap.get(key);
        }

        for (String v:hashMap.values()){
            System.out.println(v);
        }

        for (Map.Entry<String,String> e:hashMap.entrySet()){
            System.out.println(e.getKey());
            System.out.println(e.getValue());
        }
        
        while (hashMap.entrySet().iterator().hasNext()){
            Map.Entry<String, String> next = hashMap.entrySet().iterator().next();
            next.getKey();
            next.getValue();
        }


    }
}
